package com.hzit.cart.controller;

import com.hzit.cart.api.domain.OrderItem;
import com.hzit.cart.service.IOrderItemService;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author hbxfwf
 * @since 2023-09-21
 */
@RestController
@RequestMapping("/orderItem")
public class OrderItemController {
	@Autowired
	private IOrderItemService orderItemService;

	//1. 保存订单项
	@PostMapping("/save")
	R saveOrderItem(@RequestBody OrderItem orderItem) {
		orderItemService.save(orderItem);
		return R.ok();
	}

}
